package com.sudo.dao.admin.model.bo;

import com.sudo.common.validenum.EnumValue;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 为道日损 2020-04-28 9:57
 */
public class SysButtonBO {

    @NotBlank(message = "按钮名称不能为空")
    private String bName;

    @Pattern(regexp="[0-9A-Za-z_]{3,30}",message="按钮代码必须是3~30位数字、字母或下划线")
    private String bCode;

    @Pattern(regexp="[0-9A-Za-z_]{3,30}",message="菜单代码必须是3~30位数字、字母或下划线")
    private String menuCode;

    @EnumValue(strValues = {"ON","OFF"},message = "状态必须为指定值ON/OFF")
    private String status;

    @Length(max = 255,message = "备注最大长度不超过255位")
    private String note;

    public String getMenuCode() {
        return menuCode;
    }

    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    public String getbCode() {
        return bCode;
    }

    public void setbCode(String bCode) {
        this.bCode = bCode;
    }

    public String getbName() {
        return bName;
    }

    public void setbName(String bName) {
        this.bName = bName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
